package com.maxd.modules.member.dao;


import com.maxd.modules.member.entity.Member;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface MemberRepository extends JpaRepository<Member, Long> {

    @Query(value = "from Member m where m.peopleNum=:peopleNum")
    Member findMemberByPeopleNum(Integer peopleNum);

    @Query(value = "from Member m where m.grade=:grade")
    Member findMemberByGradeIndex(Integer grade);

}
